import request from "@/utils/request";

// //获取
// export function gettransfer() {
//   return request.get<any>("/kaoqin/transfer");
// }

interface requestData{
  count: string;
    code?:string
    data?:any
    msg?:string
  }
  

//调拨审批获取
export function gettransferpage(page:any=1,pagesize:any=10,state?:any) {  
  if (state!='0'&&state!=undefined&&state!=null) {
    return request<requestData,requestData>({
      url:`/kaoqin/transfer?page=${page}&page_size=${pagesize}&state=${state}`,
      method:'get',
    })
  }else{
      return request({
    url:`/kaoqin/transfer?page=${page}&page_size=${pagesize}`,
    method:'get',
  })
  }

}


//调拨审批获取
export function getSchedulingApprovals(page:any=1,pagesize:any=10) {  
    return request<requestData,requestData>({
    url:`/transfer?page=${page}&page_size=${pagesize}`,
    method:'get',
  })
}

// 提交
export function posttransfer(params: any) {
  return request.post<requestData,requestData>("/kaoqin/transfer", params);
}

// 修改
export function puttransfer(params: any) {
  return request.put<any>("/kaoqin/transfer", params);
}

//删除
export function deletetransfer(params: any) {
  return request<requestData,requestData>({
    url: "/kaoqin/transfer",
    method: "delete",
    data: params,
  });
}


//获取店铺人员
export function getshopuser(val:any) {
  return request.get<requestData,requestData>(`/kaoqin/shopuser?shopid=${val}`);
}
